<?php 

include '../function.php';

$titles =[];

// for ($i=31182; $i <31192 ; $i++) { 
// 	$str = file_get_contents("http://www.jb51.net/article/".$i.".htm");

// 	$str = mb_convert_encoding( $str, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' );


// 	$preg= "/<h1 class=\"YaHei\">(.*)<\/h1>/";


// 	$c = preg_match_all($preg, $str , $out);


// 	$titles[] = $out[1][0];
	
// }

var_dump($titles);

     $str = "345,435,34,534,5";

     // explode(',', $str);

     $preg = "/,/";

     $arr = preg_split($preg, $str);

     var_dump($arr);

    












 ?>